With speed-up of the network, it is a general practice to utilize a CAM (Content Addressable Memory) for executing a process of searching for route information etc at a high speed in the communication device. The CAM, if search target data is inputted to and contained in a pre-registered table, outputs an address (Entry number) thereof. The CAM, which is generally combined with an external SRAM (Static Random Access Memory), reads the route information etc registered in the SRAM with reference to the Entry number, and notifies of the route information etc. This scheme enables the fast search process to be done hardwarewise. Especially, if a T-CAM (Ternary CAM) capable of dynamically designating the search target data from the registered data is utilized, it is feasible to attain the search in a way that designates the search target data on the basis of a type of a received packet.
For example, in the case of searching for a route of an IPv4 (UDP (User Datagram Protocol)) packet, the route is searched for with items of data such as Destination IP Address, source IP Address, Protocol, Source Port and Destination Port, then packet processing information etc stored in the way of being associated with Entry is read based on the coincident Entry number, notification of the readout information is given, and a route process, QoS (Quality of Service) control, etc are carried out based on the readout information.
On the other hand, in the case of reassembling the fragmented packets at the high speed, there is a case of receiving the plurality of fragment packets in a simultaneous multiplexing mode from the network, and hence it is effective to identify the same fragment packet by utilizing the CAM.
FIG. 16 is a diagram illustrating an example of a configuration of a conventional communication device which executes the process of reassembling the fragment packets.
FIG. 17 is a diagram illustrating an example of a fragment format of the IPv4 packet (UDP packet). FIG. 17 illustrates the example of fragmenting data into 3 packets.
In FIG. 17, in the case of the fragmentation into the 3 packets, the data having an IPv4 header is fragmented into data 1 having a length L1, data 2 having a length L2 and data 3 having a length L3. The IPv4 header is attached to each piece of data. Further, a UDP header is also attached to the head data.
FIG. 18 is a diagram illustrating an example of a structure of the IPv4 header. The IPv4 header has Total Length (total length), ID (Identification), D flag (Don't fragment flag), M flag (More Fragment (continuous) flag), Fragment Offset (fragment offset value), Protocol, Source IP Address, Destination IP Address, etc.
The D flag is a flag for distinguishing whether the packet is the fragment packet or not. If the D flag is set such as D=0, this connotes that the packet is not the fragment packet (but a normal packet), and, if the D flag is set such as D=1, this connotes that the packet is the fragment packet.
The M flag is a flag for distinguishing whether the continuous packet exists or not. If the M flag is set such as M=0, this connotes that the continuous packet does not exist, and, if the M flag is set such as M=1, this connotes that the continuous packet exists. Namely, in the IPv4 header of a certain packet, when the D flag is set such as D=1 and when the M flag is set such as M=0, this connotes that the packet is a last fragment packet.
The fragment offset value represents a size from the header of the head packet in a start position of payload data. When the fragment offset value is 0, this connotes that the packet is a head fragment packet.
The ID (Identification) is unique information for identifying the data. The same ID is assigned to the data fragmented from the same data.
FIG. 19 is a diagram illustrating a relation between the M flag, the fragment offset value and the packet type in the IPv4 header. For example, when M=1 and when F.O. (Fragment Offset, fragment offset value)=0, the packet is the head fragment packet. When M=0 and when F.O.=0, the packet is the normal packet, however, the determination about whether the packet is the normal packet or not is made based on the D flag.
FIG. 20 is a diagram illustrating an example of a structure of the UDP header. The UDP header has Source Port, Destination Port, Length and Checksum.
With respect to the received packet received by a packet receiving unit 110 of the communication device, a fragment determining unit 120 determines whether the packet is the fragment packet or not and determines the type of the fragment packet. The determination about whether the packet is the fragment packet or not and the determination about the packet type can be made in the following manner.
The fragment determining unit 120 determines from the D flag (Don't fragment flag) in the IPv4 header whether the packet is the fragment packet or not. The fragment determining unit 120 determines from the M flag (More Fragment (continuous) flag) in the IPv4 header whether the packet is the last fragment packet or not. Further, the fragment determining unit 120, when M=1 and when Fragment Offset=0 in the IPv4 header, determines that the packet is the head fragment packet.
The same fragment packet in the fragment packets which are received in the simultaneous multiplexing mode from a plurality of transmitting sources can be identified by use of ID (identification) and Source IP address.
A fragment packet search control unit 132 searches through a CAM 134 in a way that uses the ID and Source IP Address in the fragment packet as search data. A fragment packet search result determining unit 136 identifies, when coincident by the search, the same fragment packet by notifying of Entry number as a subsequent fragment packet and accumulates the packets. There is a case in which a sequence of the fragment packets might be reversed within the network, and hence an assembly control unit 138 assembles the fragment packets according to the fragment offset value, thereby executing a reassembly process (assembly process).
After the assembly control unit 138 has reassembled the fragment packets, a search control unit 140 searches for the route in the same way with the packet other than the fragment packet. A packet processing unit 160 executes a packet process such as routing and QoS control on the basis of the route search result information of the search control unit 140.    [Patent document 1] Japanese Patent Laid-Open Publication No. 2006-74726    [Patent document 2] Japanese Patent Laid-Open Publication No. H10-285234    [Patent document 3] Japanese Patent Laid-Open Publication No. H05-207041
In the communication device depicted in FIG. 16, the search for the normal route and the search for the reassembly process are separately performed, and hence there is such a defect that each is desired to have Entry, resulting in increases in desired capacity of the CAM and in size of the search control unit as well.